﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Text.Json.Serialization;
using System.Threading.Tasks;

namespace Model
{
    public class BComment
    {
        /// <summary>
        /// 评论ID
        /// </summary>
        //[JsonIgnore]
        [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
        public int ID                  {get;set; }
        /// <summary>
        /// 文章ID
        /// </summary>
        public int ArticleID           {get;set; }
        /// <summary>
        /// 文章标题
        /// </summary>
        public string ArticleTitle     {get;set; }
        /// <summary>
        /// 父级评论ID
        /// </summary>
        public int Pid                 {get;set; }
        /// <summary>
        /// 评论来源ID
        /// </summary>
        public int FromUserID          {get;set; }
        /// <summary>
        /// 评论来源
        /// </summary>
        public string FromUserName     {get;set; }
        /// <summary>
        /// 来源评论用户头像
        /// </summary>
        public string FromUserLogo     {get;set; }
        /// <summary>
        /// 回复评论用户ID
        /// </summary>
        public int ToUserID            {get;set; }
        /// <summary>
        /// 回复评论名称
        /// </summary>
        public string ToUserName       {get;set; }
        /// <summary>
        /// 回复评论用户头像
        /// </summary>
        public string ToUserLogo       {get;set; }
        /// <summary>
        /// 回复评论内容
        /// </summary>
        public string Content          {get;set;}
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreatedAt { get; set; }

        private DateTime updatedAt = DateTime.Now;
        /// <summary>
        /// 更新时间
        /// </summary>
        public DateTime UpdatedAt { get { return updatedAt; } set { updatedAt = value; } }

    }
}
